<?php

namespace ApiBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Banner
 *
 * @ORM\Table(name="banner", options={"comment":"轮播图表"} )
 * @ORM\Entity
 */
class Banner
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\Admin")
     * @ORM\JoinColumn(name="admin_id", referencedColumnName="id", nullable=true)
     */
    private $admin;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\District")
     * @ORM\JoinColumn(name="district_id", referencedColumnName="id", nullable=true)
     */
    private $district;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\AdminRole")
     * @ORM\JoinColumn(name="admin_role_id", referencedColumnName="id", nullable=true)
     */
    private $adminRole;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255, options={"comment":"banner名称"})
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="image_path", type="string", length=255, options={"comment":"图片路径"})
     */
    private $imagePath;

    /**
     * @var string
     *
     * @ORM\Column(name="url", type="string", length=255, nullable=true, options={"comment":"链接地址url"})
     */
    private $url;

    /**
     * @var integer
     *
     * @ORM\Column(name="sort_order", type="integer", options={"default":0, "comment":"排序,数字越大排序越高"})
     */
    private $sortOrder;

    /**
     * @var integer
     *
     * @ORM\Column(name="hit", type="integer", options={"comment":"点击次数", "default":0})
     */
    private $hit;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_company", type="boolean", options={"comment":"是否是企业端: 1企业端 0管理员端"})
     */
    private $isCompany;

    /**
     * @var boolean
     *
     * @ORM\Column(name="status", type="boolean", options={"default":1,"comment":"状态位: 0禁用 1正常"})
     */
    private $status;

}
